import java.util.Scanner;

public class 计算小球走过的路程 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        float h = scanner.nextFloat();
        int n = scanner.nextInt();
        float sum = 0;
        sum += h;

        for (int i = 0; i < n; i++) {
            h /= 2;
            sum = sum + (h * 2);
            if (i == n - 1) {
                sum -= h * 2;
            }
        }
        System.out.println(String.format("%.3f", h) + " " + String.format("%.3f", sum));
        //write your code here......





    }
}

